cmake_minimum_required(VERSION 2.6)
project(Shared)

include_directories(
    ${PROJECT_SOURCE_DIR}
)

set(Shared_SRC
    Global_Macros.h
    Exception.h
    Exception.cc

    Base/Event.h
    Base/Event.cc
    Base/File.h
    Base/File.cc
    Base/LockGuard.h
    Base/Mutex.h
    Base/Mutex.cc
    Base/Runnable.h
    Base/Thread.h
    Base/Thread.cc
    Base/ThreadPool.h
    Base/ThreadPool.cc
    
    Util/String.h
    Util/String.cc
    Util/Error.h
)

if (WIN32)
set(Shared_SRC
    Base/Event_WIN32.h
    Base/Event_WIN32.cc
    Base/File_WIN32.h
    Base/File_WIN32.cc
    Base/Mutex_WIN32.h
    Base/Mutex_WIN32.cc
    Base/Thread_WIN32.h
    Base/Thread_WIN32.cc
    
    Util/String_WIN32.cc
    Util/Error_WIN32.cc
${Shared_SRC})
endif()

add_library(Shared ${Shared_SRC})